Ext.define('CDR.view.ItemSelector' ,{
    extend: 'Ext.ux.form.ItemSelector',
    alias: 'widget.pbxItemselector',
   
     reloadToData: function(values) {
     	var me = this,
            toStore, fromStore, models;
          
		console.log("reload datasss", values, me, me.toField);

        if (me.toField) {
            toStore = me.toField.boundList.getStore();
            fromStore = me.fromField.boundList.getStore();

            // Move any selected values back to the fromField
            fromStore.add(toStore.getRange());
            toStore.removeAll();

            // Move the new values over to the toField
            models = [];
            Ext.each(values, function(val) {
                var undef,
                    model = fromStore.findRecord(me.valueField, val[me.valueField], undef, undef, true, true);
                if (model) {
                	model.set('numOfbytes', val['numOfbytes']);
                	model.set('space', val['space']);
                	model.set('columnMapping', val['columnMapping']);
                    models.push(model);
                }
            });
            fromStore.remove(models);
            toStore.add(models);
        }

     }
});